.dialog-backdrop {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: #8886;
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.dialog {
    background: #fff; /*fallback*/
    background: var(--bg);
    padding: .5em; /* legacy  */
    padding: max(.5em, 1vw, 2vh);
    padding-top: 0;
    border-radius: 1em;
    position: relative;
    margin: 0 3vw;
    overflow: hidden;
    max-height: calc(100vh - 2em);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.dialog-icon {
    color: #fff;
    background-color: var(--color);
    position: absolute;
    top: 0;
    width: 2em;
    height: 1.8em;
    text-align: center;
    border-radius: .8em 0;
}
.dialog-icon-text {
    display: flex;
    align-items: center;
    justify-content: center;
}
.dialog-title {
    font-size: 120%;
    font-weight: normal;
    margin: .3em 0;
    padding: 0 0.5em; /* avoid reaching margins */
    min-height: 1.2em;
}
.dialog-closer ~ .dialog-title {
    margin-right: 2em;
}
.dialog-type ~ .dialog-title {
    margin-left: 2em;
}
.dialog-icon ~ .dialog-title {
    text-align: center;
}
.dialog-closer {
    border-radius: 0 0.8em;
    right: 0;
    padding: 0;
    background-color: #c88;
}
.dialog-icon ~ .dialog-content {
    margin-top: 1em;
}
.dialog-type {
    left: 0;
    top: 0;
    overflow: hidden;
    opacity: .7; /* render the idea that's not a button */
}
.dialog-content {
    overflow: auto;
    max-height: calc(100vh - 4.5em);
}
.dialog-content p {
    white-space: pre-wrap;
    margin: .5em 0;
}
.dialog-confirm .dialog-content button {
    margin-top: 1em;
}
.dialog-alert-info {
    --color: #282
}
.dialog-alert-warning {
    --color: #c91
}
.dialog-alert-error {
    --color: #822;
}

@media (max-width: 42em) {
    .dialog-icon { font-size: 120% }
    .dialog-icon ~ .dialog-content { margin-top: 1.5em; } /* account for larger top icons */
}

.dialog-prompt label {
    display: block;
    margin: .5em .1em;
}